I just learned something, but it seems so weird I'm not sure if it's right, especially since there are almost no posts in the forums related to this.
You can't reference document.forms[0] directly in the JSHeader (that means, not within a function). It will throw a "null or not an object" error in IE and a "has no properties" in Firefox error. It has no handle on the form at that point.
(If this is like, yes, duh, of course, for anyone out there, I swear I never knew it....).
I learned something else, if anyone is still reading: Firebug is a really nice Javascript debugger (amongst other things) in Firefox. :)
http://www.joehewitt.com/software/firebug/